<?php

require 'facebook.php';

$host = $_SERVER["HTTP_HOST"];
//echo $host;die;
if(isset($clientlogin) && $clientlogin == 1){
    if(strpos($host, 'social.qplay.vn') !== false){//real
		  $appId  = '432892786798080';
		  $secret = '73c804eca226daff0f937fcb4ff5ea59';
	}else if(strpos($host, 'wapsng.yome.vn') !== false){//real
		  $appId  = '455245004546756';
		  $secret = 'c0b59865537af38b0e46434f1fed8a58';
	}else if(strpos($host, 'social.yome.vn') !== false){//android emulator
		  $appId  = '585716521462120';
		  $secret = '134a1be546769095f99ffdcd36fa4d12';
	}else if(strpos($host, 'localhost') !== false){
		  $appId  = '317354058367349';//localhost
		  $secret = '2e356ed1b4b03397ea9f421be084f6ae';//localhost
	}
}else{
     if(strpos($host, 'social.qplay.vn') !== false){//real
		  $appId  = '432892786798080';
		  $secret = '73c804eca226daff0f937fcb4ff5ea59';
	}else if(strpos($host, 'wapsng.yome.vn') !== false){//real
		  $appId  = '455245004546756';
		  $secret = 'c0b59865537af38b0e46434f1fed8a58';
	}else if(strpos($host, 'social.yome.vn') !== false){//android emulator
		  $appId  = '585716521462120';
		  $secret = '134a1be546769095f99ffdcd36fa4d12';
	}else if(strpos($host, 'localhost') !== false){
		  $appId  = '317354058367349';//localhost
		  $secret = '2e356ed1b4b03397ea9f421be084f6ae';//localhost
	}
}

$facebook = new Facebook(array(
	  'appId'  => $appId,//thật
	  'secret' => $secret,//thật
	  'cookie' => true,
));



?>
